
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type SystemTimerRequest struct {

	Name string `json:"name" form:"name"`

	Mark string `json:"mark" form:"mark"`

	Content string `json:"content" form:"content"`

	Type string `json:"type" form:"type"`

	Month string `json:"month" form:"month"`

	Week string `json:"week" form:"week"`

	Day string `json:"day" form:"day"`

	Hour string `json:"hour" form:"hour"`

	Minute string `json:"minute" form:"minute"`

	Second string `json:"second" form:"second"`

	LastExecutionTime string `json:"last_execution_time" form:"last_execution_time"`

	NextExecutionTime string `json:"next_execution_time" form:"next_execution_time"`

	AddTime string `json:"add_time" form:"add_time"`

	IsDel string `json:"is_del" form:"is_del"`

	IsOpen string `json:"is_open" form:"is_open"`

	Customcode string `json:"customCode" form:"customCode"`

	Timestr string `json:"timeStr" form:"timeStr"`

}

func (r *SystemTimerRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *SystemTimerRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"name": "required",

		"mark": "required",

		"content": "required",

		"type": "required",

		"month": "required",

		"week": "required",

		"day": "required",

		"hour": "required",

		"minute": "required",

		"second": "required",

		"last_execution_time": "required",

		"next_execution_time": "required",

		"add_time": "required",

		"is_del": "required",

		"is_open": "required",

		"customCode": "required",

		"timeStr": "required",

	}
}

func (r *SystemTimerRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemTimerRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *SystemTimerRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
